<template>
  <div class="mainDiv" ref='mainDiv'>
    <h1 style="color: #fff;font-size: .6rem;">订单列表</h1>
    <div ref="chart1" class="template1ConImg"></div>
  </div>

</template>

<script>
	export default {
    // inject:['reload'],
		name: 'orderList',
		components: {

		},
		data() {
			return {

			}
		},
		mounted() {
      if(this.$route.path=="/orderList"){
        this.$refs.mainDiv.style.transform='scale(1)'

      }
			this.getEchartData()
		},
		methods: {
			getEchartData() {
				const chart1 = this.$refs.chart1;
				if(chart1) {
					const myChart = this.$echarts.init(chart1)
          var that = this;
          that.$myHttp.post("getTongGuanSHenBaoInfo")
            .then(function(data0) {
              if (data0.status == "200") {

              }  else {
                alert("数据请求错误")
              }

            })
            .catch(function(error) {
              alert(error)
            })
					const option = {};
					myChart.setOption(option)
					window.addEventListener("resize", function() {
						myChart.resize()
					})
				}
			},
			// this.$on('hook:destroyed', () => {
			// 	window.removeEventListener("resize", function() {
			// 		myChart.resize();
			// 	});
			// })

		}
	}
</script>

<style scoped>
	.mainDiv {
    height: 100vh;
    width: 100vw;
    background: #012d60;
    min-width: 19.2rem;
    box-sizing: border-box;
    transform-origin:0 0;
    transform: scale(0.49);
  }
</style>
